package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectQualityEntityMapper;
import com.ly.heart.domain.ProjectQualityEntity;
import com.ly.heart.service.IProjectQualityEntityService;

/**
 * 项目质量整改单Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectQualityEntityServiceImpl implements IProjectQualityEntityService
{
    @Autowired
    private ProjectQualityEntityMapper projectQualityEntityMapper;

    /**
     * 查询项目质量整改单
     *
     * @param id 项目质量整改单主键
     * @return 项目质量整改单
     */
    @Override
    public ProjectQualityEntity selectProjectQualityEntityById(String id)
    {
        return projectQualityEntityMapper.selectProjectQualityEntityById(id);
    }

    /**
     * 查询项目质量整改单列表
     *
     * @param projectQualityEntity 项目质量整改单
     * @return 项目质量整改单
     */
    @Override
    public List<ProjectQualityEntity> selectProjectQualityEntityList(ProjectQualityEntity projectQualityEntity)
    {
        return projectQualityEntityMapper.selectProjectQualityEntityList(projectQualityEntity);
    }

    /**
     * 新增项目质量整改单
     *
     * @param projectQualityEntity 项目质量整改单
     * @return 结果
     */
    @Override
    public int insertProjectQualityEntity(ProjectQualityEntity projectQualityEntity)
    {
        projectQualityEntity.setCreateTime(DateUtils.getNowDate());
        return projectQualityEntityMapper.insertProjectQualityEntity(projectQualityEntity);
    }

    /**
     * 修改项目质量整改单
     *
     * @param projectQualityEntity 项目质量整改单
     * @return 结果
     */
    @Override
    public int updateProjectQualityEntity(ProjectQualityEntity projectQualityEntity)
    {
        return projectQualityEntityMapper.updateProjectQualityEntity(projectQualityEntity);
    }

    /**
     * 批量删除项目质量整改单
     *
     * @param ids 需要删除的项目质量整改单主键
     * @return 结果
     */
    @Override
    public int deleteProjectQualityEntityByIds(String[] ids)
    {
        return projectQualityEntityMapper.deleteProjectQualityEntityByIds(ids);
    }

    /**
     * 删除项目质量整改单信息
     *
     * @param id 项目质量整改单主键
     * @return 结果
     */
    @Override
    public int deleteProjectQualityEntityById(String id)
    {
        return projectQualityEntityMapper.deleteProjectQualityEntityById(id);
    }
}
